#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "DataType.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class EnumerationLiteral;

/// <summary>
/// Enumeration
/// An Enumeration is a DataType whose values are enumerated in the model as
/// EnumerationLiterals.
/// </summary>
class UMLMODEL_EXPORT Enumeration : public DataType {

public: // Constructors and destructors
    explicit Enumeration(const QString& umlType="uml::Enumeration");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// ownedLiterals getter
    /// The ordered set of literals owned by this Enumeration.
    /// </summary>
    vector<shared_ptr<EnumerationLiteral>>& ownedLiterals();

private: // Fields
    /// <summary>
    /// ownedLiterals
    /// The ordered set of literals owned by this Enumeration.
    /// </summary>
    vector<shared_ptr<EnumerationLiteral>> ownedLiterals_;

};

} // namespace uml
